/*!
    \file    change log.txt
    \brief   change log for GD32E103V_EVAL_Demo

    \version 2026-08-18, V2.1.0, demo for GD32E103V
*/

/*
    Copyright (c) 2026, GigaDevice Semiconductor Inc.

    Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this
       list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
    3. Neither the name of the copyright holder nor the names of its contributors
       may be used to endorse or promote products derived from this software without
       specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/

******************* V2.1.0 2026-08-18 ************************************************************************************

______________________Common______________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E10x_Firmware_Library

fix reason:
update the version from V1.9.0 to V2.0.0

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Utilities/gd32e103v_eval.c

fix reason:
Centralize the printf retarget function to the USART in eval.c so that
example projects no longer need to duplicate it.

V2.0.0:
none

V2.1.0:
#include <stdio.h>

#if defined(__GNUC__) && !defined(__clang__) /* For GNU GCC compiler */
/* retarget the C library printf function to the USART, in GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* defined(__GNUC__) && !defined(__clang__) */

__________________________________________________________________________________________________________________________

______________________ADC_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/07_ADC_Temperature_Vrefint/main.c
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/08_ADC0_ADC1_Follow_up_mode/main.c
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/09_ADC0_ADC1_Regular_Parallel_mode/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________I2C_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/11_I2C_EEPROM/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________I2S_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/13_I2S_Audio_Player/Soft_Drive/wave_data.h

fix reason:
Add a compiler branch to define wavetestdata_address for compilers other
than ARMCC and IAR (e.g. GCC), so the demo can build with more toolchains.

V2.0.0:
#elif defined ( __ICCARM__ )
    #define  wavetestdata_address @0x08002000
#endif

V2.1.0:
#elif defined ( __ICCARM__ )
    #define  wavetestdata_address @0x08002000
#else
    #define  wavetestdata_address __attribute__((section(".ARM.__at_0x08002000")))
#endif

__________________________________________________________________________________________________________________________

______________________RCU_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/15_RCU_Clock_Out/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________RTC_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/18_RTC_Calendar/Soft_Drive/rtc.c

fix reason:
Rename the global variable y1 to pos_y1 to avoid naming conflicts and
improve readability.

V2.0.0:
uint16_t y1 = 100;

        lcd_char_display((x1+8*i), y1, date_string[i], char_format);

V2.1.0:
uint16_t pos_y1 = 100;

        lcd_char_display((x1+8*i), pos_y1, date_string[i], char_format);

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/18_RTC_Calendar/Soft_Drive/rtc.c

fix reason:
Change the RTC time-adjustment UART instance from USART1 to USART0 to
match the actual COM port used on the board.

V2.0.0:
    for(index = 0; index < 4; index++){
        /* loop until RBNE = 1 */
        while(usart_flag_get(USART1, USART_FLAG_RBNE) == RESET);
        tmp[index] = (usart_data_receive(USART1));

V2.1.0:
    for(index = 0; index < 4; index++){
        /* loop until RBNE = 1 */
        while(usart_flag_get(USART0, USART_FLAG_RBNE) == RESET);
        tmp[index] = (usart_data_receive(USART0));

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/18_RTC_Calendar/main.c

fix reason:
Change the RTC demo to use COM0 instead of COM1 to match the actual COM
port used on the board.

V2.0.0:
int main(void)
{
    /* COM1 config */
    gd_eval_com_init(EVAL_COM1);

V2.1.0:
int main(void)
{
    /* COM1 config */
    gd_eval_com_init(EVAL_COM0);

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/18_RTC_Calendar/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM1, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM1, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM1, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM1, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________SPI_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/12_SPI_SPI_Flash/Soft_Drive/gd25qxx.c

fix reason:
Remove the redundant semicolons to fix the MISRA issue.

V2.0.0:
    spi_init_struct.device_mode          = SPI_MASTER;;
    spi_init_struct.frame_size           = SPI_FRAMESIZE_8BIT;;
    spi_init_struct.prescale             = SPI_PSC_8 ;

V2.1.0:
    spi_init_struct.device_mode          = SPI_MASTER;
    spi_init_struct.frame_size           = SPI_FRAMESIZE_8BIT;
    spi_init_struct.prescale             = SPI_PSC_8;

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/12_SPI_SPI_Flash/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________USART_______________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/04_USART_Printf/main.c

fix reason:
Remove the redundant printf redirection functions from the example, since
they are now provided in gd32e103v_eval.c.

V2.0.0:
#ifdef GD_ECLIPSE_GCC
/* retarget the C library printf function to the USART, in Eclipse GCC environment */
int __io_putchar(int ch)
{
    usart_data_transmit(EVAL_COM0, (uint8_t) ch );
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));
    return ch;
}
#else
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
#endif /* GD_ECLIPSE_GCC */

V2.1.0:
none

__________________________________________________________________________________________________________________________

______________________USB_________________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Device/CDC_ACM/inc/usb_conf.h
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Device/HID_Keyboard/inc/usb_conf.h

fix reason:
Add a guard so that Clang (which also defines __GNUC__) does not fall
into the GNU-specific __packed definition; Clang now falls through to
the keil-compatible branch.

V2.0.0:
#if defined (__GNUC__)         /* GNU Compiler */
    #ifndef __packed
        #define __packed __unaligned
    #endif

V2.1.0:
#if  defined(__GNUC__) && !defined(__clang__)       /* GNU Compiler */
    #ifdef __packed
        #undef __packed
    #endif
    #define __packed
#elif defined (__GNUC__)       /* keil GNU Compiler */
    #ifndef __packed
        #define __packed __unaligned
    #endif

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/inc/usb_conf.h
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/MSC_Host/inc/usb_conf.h

fix reason:
Add a guard so that Clang (which also defines __GNUC__) does not fall
into the GNU-specific __packed definition; Clang now falls through to
the keil-compatible branch.

V2.0.0:
#if defined   ( __GNUC__ )   /* GNU Compiler */
    #ifndef __packed
        #define __packed  __unaligned
    #endif
#elif defined   (__TASKING__)  /* TASKING Compiler */
    #define __packed    __unaligned
#endif /* __GNUC__ */

V2.1.0:
#if  defined(__GNUC__) && !defined(__clang__)       /* GNU Compiler */
    #ifdef __packed
        #undef __packed
    #endif
    #define __packed
#elif defined (__GNUC__)       /* keil GNU Compiler */
    #ifndef __packed
        #define __packed __unaligned
    #endif
#elif defined (__TASKING__)    /* TASKING Compiler */
    #define __packed __unaligned
#endif /* __GNUC__ */

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/inc/usb_lcd_conf.h
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/MSC_Host/inc/usb_lcd_conf.h

fix reason:
Wrap the printf-to-LCD retarget macro with USE_LCD so it is only defined
when the LCD log is enabled, and add a Clang/GCC-specific branch that
retargets to __io_putchar instead of fputc.

V2.0.0:
#define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f)

V2.1.0:
#ifdef USE_LCD
    #if defined(__GNUC__) && !defined(__clang__)
        #define LCD_LOG_PUTCHAR int __io_putchar(int ch)
    #else
        #define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f)
    #endif
#endif /* USE_LCD */

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/src/lcd_log.c
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/MSC_Host/src/lcd_log.c

fix reason:
Guard the LCD printf redirection function with USE_LCD so it is only
compiled when the LCD log is enabled.

V2.0.0:
/*!
    \brief      redirect the printf to the LCD
    ......
    return ch;
}

V2.1.0:
#ifdef USE_LCD
/*!
    \brief      redirect the printf to the LCD
    ......
    return ch;
}
#endif /* USE_LCD */

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/src/gd32e103v_eval.c
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/MSC_Host/src/gd32e103v_eval.c

fix reason:
Add the board support source file to the USB host HID/MSC EB projects.

V2.0.0:
none

V2.1.0:
Added gd32e103v_eval.c file

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/src/usbh_usr.c

fix reason:
Move the usbh_host/usb_core_driver extern declarations before the
keyboard position variables for better code organization.

V2.0.0:
extern int16_t XLoc, YLoc;
extern __IO int16_t PrevX, PrevY;

uint16_t keyboard_char_xpos = 0U;
uint16_t keyboard_char_ypos = 0U;

extern usbh_host usb_host;
extern usb_core_driver usb_hid_core;

/* points to the usbh_user_cb structure */

V2.1.0:
extern int16_t XLoc, YLoc;
extern __IO int16_t PrevX, PrevY;

extern usbh_host usb_host;
extern usb_core_driver usb_hid_core;

uint16_t keyboard_char_xpos = 0U;
uint16_t keyboard_char_ypos = 0U;

/* points to the usbh_user_cb structure */

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/HID_Host/src/usbh_usr.c

fix reason:
Add non-LCD (printf via COM0) fallback code paths guarded by the USE_LCD
macro so the HID host demo can also run on boards without an LCD.

V2.0.0:
        gd_eval_key_init(KEY_USER, KEY_MODE_GPIO);
        gd_eval_key_init(KEY_WAKEUP, KEY_MODE_EXTI);

        gd_eval_lcd_init();

        lcd_log_init();
        ......
        LCD_UsrLog("USB host library started\n");

        lcd_log_footer_set((uint8_t *)MSG_HOST_FOOTER, 40U);
    }
}
......
void usbh_user_device_disconnected(void)
{
    lcd_background_color_set(LCD_COLOR_BLACK);
    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear (LCD_TEXT_ZONE_X,
                            LCD_TEXT_ZONE_Y,
                            LCD_TEXT_ZONE_WIDTH,
                            LCD_TEXT_ZONE_HEIGHT);

    LCD_UsrLog("> Device Disconnected.\n");
}
......
    LCD_UsrLog("> Enumeration completed.\n");

    lcd_text_color_set(LCD_COLOR_RED);
    lcd_vertical_string_display(LCD_HINT_LINE0, 0, (uint8_t *)"---------------------------------------");
    lcd_text_color_set(LCD_COLOR_GREEN);
    lcd_vertical_string_display(LCD_HINT_LINE1, 0, (uint8_t *)"To start the HID class operations:  ");
    lcd_vertical_string_display(LCD_HINT_LINE2, 0, (uint8_t *)"Press User Key...             ");
}
......
    LCD_UsrLog("> HID Demo Device : Mouse.\n");

    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear (LCD_TEXT_ZONE_X,
                            LCD_TEXT_ZONE_Y,
                            LCD_TEXT_ZONE_WIDTH,
                            LCD_TEXT_ZONE_HEIGHT);

    lcd_text_color_set(LCD_COLOR_GREY);
    lcd_rectangle_fill(MOUSE_WINDOW_X, MOUSE_WINDOW_Y, MOUSE_WINDOW_WIDTH, MOUSE_WINDOW_HEIGHT);
    ......
    YLoc  = 0U;
    PrevX = 0U;
    PrevY = 0U;
}
......
void usr_mouse_process_data(mouse_report_data *data)
{
    if((0U != data->x) && (0U != data->y)) {
        hid_mouse_update_position(data->x, data->y);
    }
    ......
            hid_mouse_button_released(index);
        }
    }
}
......
void usr_keybrd_init(void)
{
    LCD_UsrLog("> HID Demo Device : Keyboard.\n");
    LCD_UsrLog("> Use Keyboard to tape characters: \n");

    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear (LCD_TEXT_ZONE_X,
                            LCD_TEXT_ZONE_Y,
                            LCD_TEXT_ZONE_WIDTH,
                            LCD_TEXT_ZONE_HEIGHT);

    lcd_text_color_set(LCD_COLOR_GREY);
    lcd_rectangle_fill(KYBRD_WINDOW_X, KYBRD_WINDOW_Y, KYBRD_WINDOW_WIDTH, KYBRD_WINDOW_HEIGHT);
    ......
    keyboard_char_xpos = KYBRD_FIRST_LINE;
    keyboard_char_ypos = KYBRD_FIRST_COLUMN;
}
......
void usr_keybrd_process_data(uint8_t data)
{
    if('\n' == data) {
        keyboard_char_ypos = KYBRD_FIRST_COLUMN;
        ......
        keyboard_char_xpos = KYBRD_FIRST_LINE;
    }
}

V2.1.0:
        gd_eval_key_init(KEY_USER, KEY_MODE_GPIO);
        gd_eval_key_init(KEY_WAKEUP, KEY_MODE_EXTI);

#ifdef USE_LCD
        gd_eval_lcd_init();

        lcd_log_init();
        ......
        LCD_UsrLog("USB host library started\n");

        lcd_log_footer_set((uint8_t *)MSG_HOST_FOOTER, 40U);
#else
        gd_eval_com_init(EVAL_COM0);

        LCD_UsrLog("\r\n++++USB host library started++++\r\n");
#endif
    }
}
......
void usbh_user_device_disconnected(void)
{
#ifdef USE_LCD
    lcd_background_color_set(LCD_COLOR_BLACK);
    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear(LCD_TEXT_ZONE_X, \
                           LCD_TEXT_ZONE_Y, \
                           LCD_TEXT_ZONE_WIDTH, \
                           LCD_TEXT_ZONE_HEIGHT);
#endif

    LCD_UsrLog("> Device Disconnected.\n");
}
......
    LCD_UsrLog("> Enumeration completed.\n");

#ifdef USE_LCD
    lcd_text_color_set(LCD_COLOR_RED);
    lcd_vertical_string_display(LCD_HINT_LINE0, 0, (uint8_t *)"---------------------------------------");
    lcd_text_color_set(LCD_COLOR_GREEN);
    lcd_vertical_string_display(LCD_HINT_LINE1, 0, (uint8_t *)"To start the HID class operations:  ");
    lcd_vertical_string_display(LCD_HINT_LINE2, 0, (uint8_t *)"Press User Key...             ");
#else
    LCD_UsrLog(">To start the HID class operations:\r\n");
    LCD_UsrLog(">Press User Key...\r\n");
#endif
}
......
    LCD_UsrLog("> HID Demo Device : Mouse.\n");

#ifdef USE_LCD
    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear(LCD_TEXT_ZONE_X, \
                           LCD_TEXT_ZONE_Y, \
                           LCD_TEXT_ZONE_WIDTH, \
                           LCD_TEXT_ZONE_HEIGHT);

    lcd_text_color_set(LCD_COLOR_GREY);
    lcd_rectangle_fill(MOUSE_WINDOW_X, MOUSE_WINDOW_Y, MOUSE_WINDOW_WIDTH, MOUSE_WINDOW_HEIGHT);
    ......
    YLoc  = 0U;
    PrevX = 0U;
    PrevY = 0U;
#endif
}
......
void usr_mouse_process_data(mouse_report_data *data)
{
#ifdef USE_LCD
    if((0U != data->x) && (0U != data->y)) {
        hid_mouse_update_position(data->x, data->y);
    }
    ......
            hid_mouse_button_released(index);
        }
    }
#else
    static uint8_t button_pressed_flag = 0;

    if(0x00 == (data->x & 0x80)) {
        printf("\r\n MoveRight %x units",data->x);
    } else {
        printf("\r\n MoveLeft %x units",((uint8_t)~(data->x)+1));
    }
    if(0x00 == (data->y & 0x80)) {
        printf("---*---MoveDown %x units",data->y);
    } else {
        printf("---*---MoveUp %x units",((uint8_t)~(data->y)+1));
    }
    printf("---*---");

    if(data->buttons[0]) {
        printf("Left button is pressed.");
        data->buttons[0] -= 0x01;
        button_pressed_flag = 1;
    } else if(data->buttons[1]) {
        printf("Right button is pressed.");
        data->buttons[1] -= 0x02;
        button_pressed_flag = 1;
    } else if(data->buttons[2]) {
        printf("The wheel is pressed.");
        data->buttons[2] -= 0x04;
        button_pressed_flag = 1;
    } else {
        if(1 == button_pressed_flag) {
            printf("The button is released.");
            button_pressed_flag = 0;
        } else {
            printf("No button is pressed.");
        }
    }
#endif
}
......
void usr_keybrd_init(void)
{
#ifdef USE_LCD
    LCD_UsrLog("> HID Demo Device : Keyboard.\n");
    LCD_UsrLog("> Use Keyboard to tape characters: \n");

    lcd_text_color_set(LCD_COLOR_BLACK);

    lcd_log_textzone_clear(LCD_TEXT_ZONE_X, \
                           LCD_TEXT_ZONE_Y, \
                           LCD_TEXT_ZONE_WIDTH, \
                           LCD_TEXT_ZONE_HEIGHT);

    lcd_text_color_set(LCD_COLOR_GREY);
    lcd_rectangle_fill(KYBRD_WINDOW_X, KYBRD_WINDOW_Y, KYBRD_WINDOW_WIDTH, KYBRD_WINDOW_HEIGHT);
    ......
    keyboard_char_xpos = KYBRD_FIRST_LINE;
    keyboard_char_ypos = KYBRD_FIRST_COLUMN;
#else
    LCD_UsrLog("> HID Demo Device : Keyboard.\r\n");
    LCD_UsrLog("> Use Keyboard to tape characters:\r\n");
#endif
}
......
void usr_keybrd_process_data(uint8_t data)
{
#ifdef USE_LCD
    if('\n' == data) {
        keyboard_char_ypos = KYBRD_FIRST_COLUMN;
        ......
        keyboard_char_xpos = KYBRD_FIRST_LINE;
    }
#else
    printf("\r\n The pressed button is %c",data);
#endif
}

Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/20_USBFS/USB_Host/MSC_Host/src/usbh_usr.c

fix reason:
Add non-LCD (printf via COM0) fallback code paths guarded by the USE_LCD
macro so the MSC host demo can also run on boards without an LCD.

V2.0.0:
        gd_eval_lcd_init();

        lcd_log_init();
        ......
        LCD_UsrLog("USB host library started\n");

        lcd_log_footer_set((uint8_t *)MSG_HOST_FOOTER, 40U);
    }
}
......
    LCD_UsrLog("> Enumeration completed.\r\n");

    lcd_text_color_set(LCD_COLOR_RED);
    lcd_vertical_string_display(LCD_HINT_LINE0, 0, (uint8_t *)"---------------------------------------");
    lcd_text_color_set(LCD_COLOR_GREEN);
    lcd_vertical_string_display(LCD_HINT_LINE1, 0, (uint8_t *)"To see the disk information:  ");
    lcd_vertical_string_display(LCD_HINT_LINE2, 0, (uint8_t *)"Press User Key...             ");
}
......
    case USBH_USR_FS_READLIST:
        LCD_UsrLog("> Exploring disk flash ...\r\n");

        lcd_text_color_set(LCD_COLOR_GREEN);
        lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"To see the root content of disk");
        lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press Tamper Key...            ");

        /* Key B3 in polling */
......
    case USBH_USR_FS_WRITEFILE:
        usb_mdelay(100U);

        lcd_text_color_set(LCD_COLOR_GREEN);
        lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"                                  ");
        lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press Wakeup Key to write file");

        /* key b3 in polling */
......
            if(line_idx > 4U) {
                line_idx = 0U;

                lcd_text_color_set(LCD_COLOR_GREEN);
                lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"                                ");
                lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press User Key to continue");

                /*key B3 in polling*/

V2.1.0:
        gd_eval_lcd_init();

        lcd_log_init();
        ......
        LCD_UsrLog("USB host library started\n");

        lcd_log_footer_set((uint8_t *)MSG_HOST_FOOTER, 40U);
#else
        gd_eval_com_init(EVAL_COM0);

        LCD_UsrLog("\r\n++++USB host library started++++\r\n");
#endif
    }
}
......
    LCD_UsrLog("> Enumeration completed.\r\n");

#ifdef USE_LCD
    lcd_text_color_set(LCD_COLOR_RED);
    lcd_vertical_string_display(LCD_HINT_LINE0, 0, (uint8_t *)"---------------------------------------");
    lcd_text_color_set(LCD_COLOR_GREEN);
    lcd_vertical_string_display(LCD_HINT_LINE1, 0, (uint8_t *)"To see the disk information:  ");
    lcd_vertical_string_display(LCD_HINT_LINE2, 0, (uint8_t *)"Press User Key...             ");
#else
    LCD_UsrLog(">To see the disk information: \r\n");
    LCD_UsrLog(">Press User Key...\r\n");
#endif
}
......
    case USBH_USR_FS_READLIST:
        LCD_UsrLog("> Exploring disk flash ...\r\n");

#ifdef USE_LCD
        lcd_text_color_set(LCD_COLOR_GREEN);
        lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"To see the root content of disk");
        lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press Tamper Key...            ");
#else
        LCD_UsrLog(">>> To see the root content of disk \r\n");
        LCD_UsrLog(">>> Press Tamper Key...\r\n");
#endif

        /* Key B3 in polling */
......
    case USBH_USR_FS_WRITEFILE:
        usb_mdelay(100U);

#ifdef USE_LCD
        lcd_text_color_set(LCD_COLOR_GREEN);
        lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"                                  ");
        lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press Wakeup Key to write file");
#else
        LCD_UsrLog(">>> Press Wakeup Key to write file\r\n");
#endif

        /* key b3 in polling */
......
            if(line_idx > 4U) {
                line_idx = 0U;

#ifdef USE_LCD
                lcd_text_color_set(LCD_COLOR_GREEN);
                lcd_vertical_string_display(LCD_HINT_LINE1, 0U, (uint8_t *)"                                ");
                lcd_vertical_string_display(LCD_HINT_LINE2, 0U, (uint8_t *)"Press User Key to continue");
#else
                LCD_UsrLog(">>> Press User Key to continue\r\n");
#endif

                /*key B3 in polling*/

__________________________________________________________________________________________________________________________

******************* V2.0.0 2026-02-10 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E10x_Firmware_Library
fix reason:
update the version from V1.8.0 to V1.9.0
V1.9.0:

V2.0.0:
__________________________________________________________________________________________________________________________

******************* V1.9.0 2025-08-14 ************************************************************************************
______________________Common______________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E10x_Firmware_Library
fix reason:
update the version from V1.7.0 to V1.8.0
V1.8.0:

V1.9.0:
__________________________________________________________________________________________________________________________


______________________Module RTC__________________________________________________________________________________________
Fix file:
../GD32E10x_Demo_Suites/GD32E103V_EVAL_Demo_Suites/Projects/18_RTC_Calendar/main.c
fix reason:
Before reading BKP_DATAx, the RCU_BDCTL_BKPRST bit must be cleared first; otherwise, it may cause the MCU to crash.
V1.8.0:
/*!
    \brief      different processes depending on the backup data to display calendar on LCD
    \param[in]  none
    \param[out] none
    \retval     none
*/
void rtc_process(void)
{
    uint32_t rtcsrc_flag = 0;

    printf("\r\n This is a RTC demo......" );

    /* get RTC clock entry selection */
    rtcsrc_flag = GET_BITS(RCU_BDCTL, 8, 9);

    if((bkp_data_read(BKP_DATA_0) != BACKUP_DATA) || (0U == rtcsrc_flag)){
        /* backup data register value is not correct or not yet programmed
        or RTC clock source is not configured (when the first time the program
        is executed or data in RCU_BDCTL is lost due to Vbat feeding) */
        printf("\r\n RTC has not been configured yet....");

        /* RTC configuration */
        rtc_configuration();

        printf("\r\n start the RTC configuration....");

        /* adjust time by values entred by the user on the hyperterminal */
        time_adjust();

        bkp_data_write(BKP_DATA_0, BACKUP_DATA);
    }else{
        /* check if the power on/down reset flag is set */
        if(rcu_flag_get(RCU_FLAG_PORRST) != RESET){
            printf("\r\n\n Power On/Down Reset occurred....");
        }else if(rcu_flag_get(RCU_FLAG_SWRST) != RESET){
            /* check if the pin reset flag is set */
            printf("\r\n\n External Reset occurred....");
        }

        /* allow access to BKP domain */
        rcu_periph_clock_enable(RCU_PMU);
        pmu_backup_write_enable();
    
        printf("\r\n No need to configure RTC....");
        /* wait for RTC registers synchronization */
        rtc_register_sync_wait();
        rtc_lwoff_wait();
        /* enable the RTC second interrupt*/
        rtc_interrupt_enable(RTC_INT_SECOND);
        /* wait until last write operation on RTC registers has finished */
        rtc_lwoff_wait();
    }
}
V1.9.0:
/*!
    \brief      different processes depending on the backup data to display calendar on LCD
    \param[in]  none
    \param[out] none
    \retval     none
*/
void rtc_process(void)
{
    uint32_t rtcsrc_flag = 0;

    printf("\r\n This is a RTC demo......" );

    /* enable PMU and BKPI clocks */
    rcu_periph_clock_enable(RCU_BKPI);
    rcu_periph_clock_enable(RCU_PMU);
    /* allow access to BKP domain */
    pmu_backup_write_enable();
    if(RESET != (RCU_BDCTL & RCU_BDCTL_BKPRST)) {
        rcu_bkp_reset_disable();
    }

    /* get RTC clock entry selection */
    rtcsrc_flag = GET_BITS(RCU_BDCTL, 8, 9);

    if((bkp_data_read(BKP_DATA_0) != BACKUP_DATA) || (0U == rtcsrc_flag)){
        /* backup data register value is not correct or not yet programmed
        or RTC clock source is not configured (when the first time the program
        is executed or data in RCU_BDCTL is lost due to Vbat feeding) */
        printf("\r\n RTC has not been configured yet....");

        /* RTC configuration */
        rtc_configuration();

        printf("\r\n start the RTC configuration....");

        /* adjust time by values entred by the user on the hyperterminal */
        time_adjust();

        bkp_data_write(BKP_DATA_0, BACKUP_DATA);
    }else{
        /* check if the power on/down reset flag is set */
        if(rcu_flag_get(RCU_FLAG_PORRST) != RESET){
            printf("\r\n\n Power On/Down Reset occurred....");
        }else if(rcu_flag_get(RCU_FLAG_SWRST) != RESET){
            /* check if the pin reset flag is set */
            printf("\r\n\n External Reset occurred....");
        }

        /* allow access to BKP domain */
        rcu_periph_clock_enable(RCU_PMU);
        pmu_backup_write_enable();
    
        printf("\r\n No need to configure RTC....");
        /* wait for RTC registers synchronization */
        rtc_register_sync_wait();
        rtc_lwoff_wait();
        /* enable the RTC second interrupt*/
        rtc_interrupt_enable(RTC_INT_SECOND);
        /* wait until last write operation on RTC registers has finished */
        rtc_lwoff_wait();
    }
}
__________________________________________________________________________________________________________________________
